import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:"/home",
    name:"home",
    component:()=>import("../views/home.vue"),
    children:[
      {
        path:"/home/one",
        name:"one",
        component:()=>import("../views/home/one.vue")
      },
      {
        path:"/home/two",
        name:"two",
        component:()=>import("../views/home/two.vue")
      },
      {
        path:"/home/three",
        name:"three",
        component:()=>import("../views/home/three.vue")
      }
    ]
  },
  {
    path:"/good",
    name:"good",
    component:()=>import("../views/good.vue")
  },
  {
    path:"*",
    redirect:"/home"
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
